<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box" style="width: 1000px; height: 500px;"></div>
</body>
<script src="./echarts.js"></script>
<script>
    // 绘制简单的图表
    let box = document.querySelector("#box")
    let chart = echarts.init(box)


    let option = {
        title: {
            text: '衣服'
        },
        tooltip: {},
        legend: {
            data: ['销量']
        },
        xAxis: {
            data:['衬衫','西装裤','皮鞋','袜子','外套']
        },
        yAxis:{},
        series: [
            {
                name:'销量',
                type: 'bar', //柱状图
                data: [5,20,12,30,51]
            }
        ]
    }

    chart.setOption(option)

</script>
</html>
